<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>两新党员基本信息</title>
<link href="/djzx/css/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/djzx/js/jquery-1.8.1.min.js"></script>
<script language="javascript" src="/djzx/js/backPage/clientSideApp.js"></script>
<script language="javascript" type="text/javascript" src="/djzx/js/My97DatePicker/WdatePicker.js"></script>
<script language="JavaScript" type="text/javascript" src="/djzx/js/backPage/win_center.js"></script>
<script type="text/javascript" src="/djzx/js/layer/layer.js" ></script>
<style type="text/css">
/* select{
	max-width:200px;
} */
</style>
<SCRIPT language=JavaScript type=text/JavaScript>
//查询模式：0代表查询，1代表高级查询
var queryMode = 0;
//党员查询参数字符串
var memberParamStr = "member.name=" + encodeURI(encodeURI(""));
memberParamStr += "&member.sex=" + encodeURI(encodeURI(""));
memberParamStr += "&member.nationality=" + encodeURI(encodeURI(""));
memberParamStr += "&member.nativePlace=" + encodeURI(encodeURI(""));
memberParamStr += "&member.born=" + encodeURI(encodeURI(""));
memberParamStr += "&member.degree=" + encodeURI(encodeURI(""));
memberParamStr += "&member.workDate=" + encodeURI(encodeURI(""));
memberParamStr += "&member.partyName=" + encodeURI(encodeURI(""));
memberParamStr += "&member.memberType=" + encodeURI(encodeURI(""));
memberParamStr += "&member.joinDate=" + encodeURI(encodeURI(""));
memberParamStr += "&member.confirmDate=" + encodeURI(encodeURI(""));
memberParamStr += "&member.title=" + encodeURI(encodeURI(""));
memberParamStr += "&member.note=" + encodeURI(encodeURI(""));
memberParamStr += "&minAge=" + encodeURI(encodeURI(""));
memberParamStr += "&maxAge=" + encodeURI(encodeURI(""));
memberParamStr += "&minWorkDate=" + encodeURI(encodeURI(""));
memberParamStr += "&maxWorkDate=" + encodeURI(encodeURI(""));
memberParamStr += "&minJoinDate=" + encodeURI(encodeURI(""));
memberParamStr += "&maxJoinDate=" + encodeURI(encodeURI(""));
memberParamStr += "&minConfirmDate=" + encodeURI(encodeURI(""));
memberParamStr += "&maxConfirmDate=" + encodeURI(encodeURI(""));

var name_layer = "";
var sex_layer = "";
var nationality_layer = "";
var nativePlace_layer = "";
var born_layer = "";
var degree_layer = "";
var workDate_layer = "";
var partyName_layer = "";
var memberType_layer = "";
var joinDate_layer = "";
var confirmDate_layer = "";
var title_layer = "";
var note_layer = "";
var minAge_layer = "";
var maxAge_layer = "";
var minWorkDate_layer = "";
var maxWorkDate_layer = "";
var minJoinDate_layer = "";
var maxJoinDate_layer = "";
var minConfirmDate_layer = "";
var maxConfirmDate_layer = "";

window.onload = function(){
	var flag = $('#flag').val();
	if(flag != ""){
		alert(flag);
	}
	$('#flag').val('');
}

function toAddMember(){
	window.location.href="/djzx/LXMemberAction!toAddMemberInfo.action";
}

function toEditMember(timeKey){
	window.location.href="/djzx/LXMemberAction!toEditMemberInfo.action?member.timeKey="+timeKey + "&editFrom=1";
}

function delMember(timeKey){
	var r = confirm("确定要删除吗?");
	if(r){
		$.post(
				"/djzx/LXMemberAction!delMemberInfo.action",
				{
					"member.timeKey":timeKey
				},
				function(data){
					alert(data.message);
					if(data.success){
						location.href="/djzx/LXMemberAction!getMemberInfoListForPage.action";
					}
				},
				"json"
				)
	}
}

function importMemberList(){
	var excels = $("#excel");
	for(var i=0;i<excels.length;i++){
		var excel = excels[i];
		if($(excel).val().length==0){
			alert("上传Excel不能为空");
			return;
		}
	}
	
	$('#form1').submit();
}

function exportMemberList(){
	/* location.href="/djzx/LXMemberAction!exportMemberListToExcel.action"; */
	//location.href = "/djzx/LXPartyAction!exportMemberListToExcel.action?" + memberParamStr;
	var count = parseInt($('#count').html());
	if(count > 0){
		location.href = "/djzx/LXMemberAction!exportMemberListToExcel.action?" + memberParamStr;
	}else{
		alert('当前没有党员信息');
	}
}

function searchMember(){
	queryMode = 0;
	ajaxMember(1);
}

function firstPage(){
	ajaxMember(1);
}

function prevPage(){
	var start =parseInt($("#start").html());
	if(start <= 1){
		start = 1;
	}else{
		start--;
	}
	ajaxMember(start);
}

function nextPage(){
	var start =parseInt($("#start").html());
	var count = parseInt($("#pageCount").html());
	if(start >= count){
		start = count;
	}else{
		start++;
	}
	ajaxMember(start);
}

function endPage(){
	var last = parseInt($("#pageCount").html());
	ajaxMember(last);
}

function ajaxMember(start){
	var name = "";
	var sex = "";
	var nationality = "";
	var nativePlace = "";
	var born = "";
	var degree = "";
	var workDate = "";
	var partyName = "";
	var memberType = "";
	var joinDate = "";
	var confirmDate = "";
	var title = "";
	var note = "";

	var minAge = "";
	var maxAge = "";
	var minWorkDate = "";
	var maxWorkDate = "";
	var minJoinDate = "";
	var maxJoinDate = "";
	var minConfirmDate = "";
	var maxConfirmDate = "";
	
	if(queryMode == 0){ // 查询
		var param = $.trim($('#param').val());
		var paramValue = $.trim($('#paramValue').val());
		
		if(param == 'name'){
			name = paramValue;
		}else if(param == 'sex'){
			sex = paramValue;
		}else if(param == 'nationality'){
			nationality = paramValue;
		}else if(param == 'nativePlace'){
			nativePlace = paramValue;
		}else if(param == 'born'){
			born = paramValue;
		}else if(param == 'degree'){
			degree = paramValue;
		}else if(param == 'workDate'){
			workDate = paramValue;
		}else if(param == 'partyName'){
			partyName = paramValue;
		}else if(param == 'memberType'){
			memberType = paramValue;
		}else if(param == 'joinDate'){
			joinDate = paramValue;
		}else if(param == 'confirmDate'){
			confirmDate = paramValue;
		}else if(param == 'title'){
			title = paramValue;
		}
	}else if(queryMode == 1){ // 高级查询
		name = name_layer;
		sex = sex_layer;
		nationality = nationality_layer;
		nativePlace = nativePlace_layer;
		born = born_layer;
		degree = degree_layer;
		workDate = workDate_layer;
		partyName = partyName_layer;
		memberType = memberType_layer;
		joinDate = joinDate_layer;
		confirmDate = confirmDate_layer;
		title = title_layer;
		note = note_layer;
		minAge = minAge_layer;
		maxAge = maxAge_layer;
		minWorkDate = minWorkDate_layer;
		maxWorkDate = maxWorkDate_layer;
		minJoinDate = minJoinDate_layer;
		maxJoinDate = maxJoinDate_layer;
		minConfirmDate = minConfirmDate_layer;
		maxConfirmDate = maxConfirmDate_layer;
	}
	
	memberParamStr = "member.name=" + encodeURI(encodeURI(name));
	memberParamStr += "&member.sex=" + encodeURI(encodeURI(sex));
	memberParamStr += "&member.nationality=" + encodeURI(encodeURI(nationality));
	memberParamStr += "&member.nativePlace=" + encodeURI(encodeURI(nativePlace));
	memberParamStr += "&member.born=" + encodeURI(encodeURI(born));
	memberParamStr += "&member.degree=" + encodeURI(encodeURI(degree));
	memberParamStr += "&member.workDate=" + encodeURI(encodeURI(workDate));
	memberParamStr += "&member.partyName=" + encodeURI(encodeURI(partyName));
	memberParamStr += "&member.memberType=" + encodeURI(encodeURI(memberType));
	memberParamStr += "&member.joinDate=" + encodeURI(encodeURI(joinDate));
	memberParamStr += "&member.confirmDate=" + encodeURI(encodeURI(confirmDate));
	memberParamStr += "&member.title=" + encodeURI(encodeURI(title));
	memberParamStr += "&member.note=" + encodeURI(encodeURI(note));
	memberParamStr += "&minAge=" + encodeURI(encodeURI(minAge));
	memberParamStr += "&maxAge=" + encodeURI(encodeURI(maxAge));
	memberParamStr += "&minWorkDate=" + encodeURI(encodeURI(minWorkDate));
	memberParamStr += "&maxWorkDate=" + encodeURI(encodeURI(maxWorkDate));
	memberParamStr += "&minJoinDate=" + encodeURI(encodeURI(minJoinDate));
	memberParamStr += "&maxJoinDate=" + encodeURI(encodeURI(maxJoinDate));
	memberParamStr += "&minConfirmDate=" + encodeURI(encodeURI(minConfirmDate));
	memberParamStr += "&maxConfirmDate=" + encodeURI(encodeURI(maxConfirmDate));
	
	$.ajax({
		url:'${pageContext.request.contextPath}/LXMemberAction!searchMemberList.action',
		data:{
			"page.currPage":start,
			"member.name":name,
			"member.sex":sex,
			"member.nationality":nationality,
			"member.nativePlace":nativePlace,
			"member.born":born,
			"member.degree":degree,
			"member.workDate":workDate,
			"member.partyName":partyName,
			"member.memberType":memberType,
			"member.joinDate":joinDate,
			"member.confirmDate":confirmDate,
			"member.title":title,
			"member.note":note,
			"minAge":minAge,
			"maxAge":maxAge,
			"minWorkDate":minWorkDate,
			"maxWorkdate":maxWorkDate,
			"minJoinDate":minJoinDate,
			"maxJoinDate":maxJoinDate,
			"minConfirmDate":minConfirmDate,
			"maxConfirmDate":maxConfirmDate
		},
		type:'post',
		dataType:'json',
		success:function(data){
			var str="";
			if(data.map.length>0){
				$.each(data.map,function(i){
					str+='<tr><td class="td_01">'+data.map[i].index+
					'</td><td class="td_01"><a href="/djzx/LXMemberAction!toShowMemberInfo.action?member.timeKey='+data.map[i].timeKey+'" target="_blank">'+data.map[i].name+'</a>'+
					'</td><td class="td_01">'+data.map[i].sex+
					'</td><td class="td_01">'+data.map[i].nationality+
					'</td><td class="td_01">'+data.map[i].nativePlace+
					'</td><td class="td_01">'+data.map[i].born+
					'</td><td class="td_01">'+data.map[i].degree+
					'</td><td class="td_01">'+data.map[i].workDate+
					'</td><td class="td_01">'+data.map[i].partyName+
					'</td><td class="td_01">'+data.map[i].memberType+
					'</td><td class="td_01">'+data.map[i].joinDate+
					'</td><td class="td_01">'+data.map[i].confirmDate+
					'</td><td class="td_01">'+data.map[i].title+
					'</td><td class="td_01">'+data.map[i].note+
					'</td><td nowrap class="td_01"><a href="/djzx/LXMemberAction!toShowMemberInfo.action?member.timeKey='+data.map[i].timeKey+'" target="_blank">查看</a>|<a href="javascript:void(0)" onclick="toEditMember('+data.map[i].timeKey+')">编辑</a>|<a href="javascript:void(0)" onclick="delMember('+data.map[i].timeKey+')">删除</a></td></tr>';
				});
			}
			$("#nodeContent").html(str);
			$("#start").html(data.object.currPage);
			$("#pageCount").html(data.object.pageCount);
			$("#count").html(data.object.count);
		}
	}); 
}

function advancedQueryMember(){
	queryMode = 1;
	name_layer = $.trim($('#name').val());
	sex_layer = $.trim($('#sex').val());
	nationality_layer = $.trim($('#nationality').val());
	nativePlace_layer = $.trim($('#nativePlace').val());
	born_layer = $.trim($('#born').val());
	degree_layer = $.trim($('#degree').val());
	workDate_layer = $.trim($('#workDate').val());
	partyName_layer = $.trim($('#partyName').val());
	memberType_layer = $.trim($('#memberType').val());
	joinDate_layer = $.trim($('#joinDate').val());
	confirmDate_layer = $.trim($('#confirmDate').val());
	title_layer = $.trim($('#title').val());
	note_layer = $.trim($('#note').val());
	minAge_layer = $.trim($('#minAge').val());
	maxAge_layer = $.trim($('#maxAge').val());
	minWorkDate_layer = $.trim($('#minWorkDate').val());
	maxWorkDate_layer = $.trim($('#maxWorkDate').val());
	minJoinDate_layer = $.trim($('#minJoinDate').val());
	maxJoinDate_layer = $.trim($('#maxJoinDate').val());
	minConfirmDate_layer = $.trim($('#minConfirmDate').val());
	maxConfirmDate_layer = $.trim($('#maxConfirmDate').val());
	
	if(minAge_layer != "" && isNaN(minAge_layer)){
		alert("最小年龄必须为数字");
		return;
	}
	if(maxAge_layer != "" && isNaN(maxAge_layer)){
		alert("最大年龄必须为数字");
		return;
	}
	// 出生日期和年龄段不能同时填写
	if(born_layer != "" && (minAge_layer != "" || maxAge_layer != "")){
		alert("出生日期和年龄段不能同时填写");
		return;
	}
	ajaxMember(1);
}

function goback(){
	window.location.href="/djzx/LXPartyAction!getPartyInfoListForPage.action";
}

function setPartyName(){
	var options = "";
	
	$("#partyName2 option").each(function(){
        if($(this).val() == $('#generalPartyName').val()){
        	var option = '<option value="' + $(this).text() + '">' + $(this).text() + '</option>';
        	options += option;
        }
	});
	
	$('#partyName').html(options);
}

</SCRIPT>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form action="/djzx/LXMemberAction!importExcelToMemberList.action" method="post" id="form1" enctype="multipart/form-data">
<input id="flag" value="${flag }" type="hidden"/>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="25" align="center" valign="bottom" class="td06"><table width="98%" border="0" cellspacing="3" cellpadding="0">
      <tr>
        <td width="15"><img src="/djzx/images/index_32.gif" width="9" height="9"></td>
        <td valign="bottom" class="title">党员信息查询</td>
      </tr>
    </table></td>
  </tr>
</table>
<br>
<table width="95%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td class="td_page">
	  查询参数：
      <select name="param" id="param">
      	<option value="name">姓名</option>
        <option value="sex">性别</option>
        <option value="nationality">民族</option>
        <option value="nativePlace">籍贯</option>
        <option value="born">出生年月</option>
        <!-- <option value="degree">学历</option> -->
        <option value="workDate">参加工作年月</option>
        <option value="partyName">所属党组织名称</option>
        <option value="memberType">党员类型</option>
        <option value="joinDate">入党日期</option>
        <option value="confirmDate">转正日期</option>
        <option value="title">职务名称</option>
      </select>
             参数值：
      <input name="paramValue" id="paramValue" type="text" class="input" size="10">
      <input type="button" class="buttonface02" value=" 查询 " onclick="searchMember()">
      <input type="button" class="buttonface02" value=" 高级查询 " id="advancedQuery">
	  <input type="button" class="buttonface02" value=" 新增 " onclick="toAddMember()">
	  <input type="button" class="buttonface02" value=" 导出Excel " onclick="exportMemberList()">
	  <input type="file" id="excel" name="excel" />
	  <input type="button" class="buttonface02" value=" 导入Excel " onclick="importMemberList()">
	  <input type="button" class="buttonface02" value=" 返回 " onclick="goback()">
    </td>
  </tr>
</table>
<br>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td nowrap class="td_top">序号</td>
    <td nowrap class="td_top">姓名</td>
    <td nowrap class="td_top">性别</td>
    <td nowrap class="td_top">民族</td>
    <td nowrap class="td_top">籍贯</td>
     <td nowrap class="td_top">出生年月</td>
	 <td nowrap class="td_top">学历</td>
	 <td nowrap class="td_top">参加工作年月</td>
	 <td nowrap class="td_top">所属党组织名称</td>
	 <td nowrap class="td_top">党员类型</td>
	 <td nowrap class="td_top">入党日期</td>
	 <td nowrap class="td_top">转正日期</td>
	 <td nowrap class="td_top">职务名称</td>
	 <td nowrap class="td_top">备注</td>
	 <td nowrap class="td_top">操作</td>
  </tr>
  <tbody id="nodeContent">
  <s:iterator value="memberList" var="m" status="statu">
  <tr> 
	<td class="td_01">${statu.index+1 }</td>
    <td class="td_01">
    	<a href="/djzx/LXMemberAction!toShowMemberInfo.action?member.timeKey=${m.timeKey}" target="_blank">${m.name }</a>
    </td>
    <td class="td_01">${m.sex }</td>
    <td class="td_01">${m.nationality }</td>
    <td class="td_01">${m.nativePlace }</td>
	<td class="td_01">${m.born }</td>
    <s:if test="#m.degree==-1">
    <td class="td_01">其他</td>
    </s:if>
    <s:elseif test="#m.degree==0">
    <td class="td_01">小学</td>
    </s:elseif>
    <s:elseif test="#m.degree==1">
    <td class="td_01">初中</td>
    </s:elseif>
    <s:elseif test="#m.degree==2">
    <td class="td_01">技工学校</td>
    </s:elseif>
    <s:elseif test="#m.degree==3">
    <td class="td_01">中等专科</td>
    </s:elseif>
    <s:elseif test="#m.degree==4">
    <td class="td_01">普通高中</td>
    </s:elseif>
    <s:elseif test="#m.degree==5">
    <td class="td_01">大专</td>
    </s:elseif>
    <s:elseif test="#m.degree==6">
    <td class="td_01">大学</td>
    </s:elseif>
    <s:elseif test="#m.degree==7">
    <td class="td_01">硕士研究生</td>
    </s:elseif>
    <s:elseif test="#m.degree==8">
    <td class="td_01">博士研究生</td>
    </s:elseif>
    <s:else>
    <td class="td_01"></td>
    </s:else>
    <td class="td_01">${m.workDate }</td>
	<td class="td_01">${m.partyName }</td>
    <td class="td_01">${m.memberType }</td>
    <td class="td_01">${m.joinDate }</td>
	<td class="td_01">${m.confirmDate }</td>
    <td class="td_01">${m.title }</td>
	<td class="td_01">${m.note }</td>
	<td nowrap class="td_01">
		<a href="/djzx/LXMemberAction!toShowMemberInfo.action?member.timeKey=${m.timeKey}" target="_blank">查看</a>|
		<a href="#" onclick="toEditMember(${m.timeKey})">编辑</a>|
		<a href="#" onclick="delMember(${m.timeKey})">删除</a>
	</td>
  </tr>
  </s:iterator>
  </tbody>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td nowrap width="95%" class="td_top"></td>
  </tr>
</table>
<table width="95%"  border="0" cellpadding="0" cellspacing="0" class="table02" align="center">
  <tr>
    <td height="30" align="right">
	    <img src="/djzx/images/1.gif" width="4" height="5" align="absmiddle"> <a href="javascipt:;" onclick="firstPage()">首页</a>　
	    <img src="/djzx/images/2.gif" width="3" height="5" align="absmiddle"> <a href="javascipt:;" onclick="prevPage()">上一页</a>　 
	    <img src="/djzx/images/2-2.gif" width="3" height="5" align="absmiddle"> <a href="javascipt:;" onclick="nextPage()">下一页</a>　 
	    <img src="/djzx/images/3.gif" width="4" height="5" align="absmiddle"> <a href="javascipt:;" onclick="endPage()">末页</a>　　
	         当前第<span id="start">${page.currPage}</span>页,共<span id="pageCount">${page.pageCount}</span>页,共<span id="count">${page.count}</span>条记录
    </td>
  </tr>
</table>
</form>
<div style="display: none">
	<select name="generalPartyName2" id="generalPartyName2">
		<option value=""></option>
    	<s:iterator value="lxGeneralPartyList" var="c" status="statu">
        <option value="${c.timeKey }">${c.name }</option>
        </s:iterator>
    </select>
    <select name="partyName2" id="partyName2">
    	<option value=""></option>
        <s:iterator value="lxPartyList" var="c" status="statu">
        <option value="${c.lxGeneralParty.timeKey }">${c.name }</option>
        </s:iterator>
    </select>
</div>
<script type="text/javascript">

//禁止通过回车提交表单
$(document).keypress(function(event){  
    var keycode = (event.keyCode ? event.keyCode : event.which);  
    if(keycode == '13'){  
        return false;    
    }  
});  

$(document).ready(function(){
	var layerW = '800px';
	var layerH = '500px';
	
	function ajaxParty(start){
		
		$.ajax({
			url:'${pageContext.request.contextPath}/CommunityMemberAction!getAllPartyList.action',
			data:{
				"page.currPage":start
			},
			type:'post',
			dataType:'json',
			success:function(data){
				if(data.map.length>0){
					var partyNames='<option value=""></option>';
					var nationalities = '<option value=""></option>';
					var degrees = '<option value=""></option>';
					var generalPartyNames = $('#generalPartyName2').html();
					/* $.each(data.map,function(i){
						partyNames += '<option value="' + data.map[i].name + '">' + data.map[i].name + '</option>';
					}); */
					nationalities += '<option value="汉族">汉族</option><option value="蒙古族">蒙古族</option><option value="回族">回族</option>'
					+ '<option value="藏族">藏族</option><option value="维吾尔族">维吾尔族</option><option value="苗族">苗族</option>'
					+ '<option value="彝族">彝族</option><option value="壮族">壮族</option><option value="布依族">布依族</option>'
					+ '<option value="朝鲜族">朝鲜族</option><option value="满族">满族</option><option value="侗族">侗族</option>'
					+ '<option value="瑶族">瑶族</option><option value="白族">白族</option><option value="土家族">土家族</option>'
					+ '<option value="哈尼族">哈尼族</option><option value="傣族">傣族</option><option value="黎族">黎族</option>'
					+ '<option value="傈傈族">傈傈族</option><option value="佤族">佤族</option><option value="畲族">畲族</option>'
					+ '<option value="高山族">高山族</option><option value="拉祜族">拉祜族</option><option value="水族">水族</option>'
					+ '<option value="东乡族">东乡族</option><option value="纳西族">纳西族</option><option value="景颇族">景颇族</option>'
					+ '<option value="柯尔克孜族">柯尔克孜族</option><option value="土族">土族</option><option value="达斡尔族">达斡尔族</option>'
					+ '<option value="仫佬族">仫佬族</option><option value="羌族">羌族</option><option value="布朗族">布朗族</option>'
					+ '<option value="撒拉族">撒拉族</option><option value="毛南族">毛南族</option><option value="仡佬族">仡佬族</option>'
					+ '<option value="锡伯族">锡伯族</option><option value="阿昌族">阿昌族</option><option value="普米族">普米族</option>'
					+ '<option value="塔吉克族">塔吉克族</option><option value="怒族">怒族</option><option value="乌孜别克族">乌孜别克族</option>'
					+ '<option value="俄罗斯族">俄罗斯族</option><option value="鄂温克族">鄂温克族</option><option value="德昂族">德昂族</option>'
					+ '<option value="保安族">保安族</option><option value="裕固族">裕固族</option><option value="京族">京族</option>'
					+ '<option value="塔塔尔族">塔塔尔族</option><option value="独龙族">独龙族</option><option value="鄂伦春族">鄂伦春族</option>'
					+ '<option value="赫哲族">赫哲族</option><option value="门巴族">门巴族</option><option value="珞巴族">珞巴族</option>'
					+ '<option value="基诺族">基诺族</option>';
					
					// 大学及以上学历（-5）、大专及以上学历（-4）、高中（包括中专）及以下（-3）、初中及以下（-2）
					degrees += '<option value="0">小学</option><option value="1">初中</option><option value="2">技工学校</option>'
					+ '<option value="3">中等专科</option><option value="4">普通高中</option><option value="5">大专</option>'
					+ '<option value="6">大学</option><option value="7">硕士研究生</option><option value="8">博士研究生</option>'
					+ '<option value="-1">其他</option><option value="-2">初中及以下</option><option value="-3">高中（包括中专）及以下</option>'
					+ '<option value="-4">大专及以上</option><option value="-5">大学及以上学历</option>';
					
					var content = '<br><table align="center" width="95%" border="0" cellspacing="0" cellpadding="0">'
						+ '<tr><td width="90" height="24" class="td_form01">姓名</td>'
				      	+ '<td nowrap class=td_form02><input type="text" size="10" id="name" /></td>'
				      	+ '<td width="90" class="td_form01">性别</td>'
				      	+ '<td nowrap class=td_form02><select name="sex" id="sex"><option value=""></option><option value="男">男</option><option value="女">女</option></select></td></tr>'
				      	+ '<tr><td height="24" class="td_form01">民族</td>'
				      	+ '<td nowrap class=td_form02><select name="nationality" id="nationality">'
				        + nationalities + '</select></td>'
				        + '<td class="td_form01">籍贯</td>'
				        + '<td nowrap class=td_form02><input type="text" size="10" id="nativePlace" /></td></tr>'
				        + '<tr><td height="24" class="td_form01">出生年月</td>'
				        + '<td nowrap class=td_form02><input type="text" size="10" id="born" name="born" /></td>'
				        + '<td class="td_form01">学历</td>'
				        //+ '<td nowrap class=td_form02><input type="text" size="10" id="degree" /></td></tr>'
				        + '<td nowrap class=td_form02><select name="degree" id="degree">'
				        + degrees + '</select></td></tr>'
				        + '<tr><td class="td_form01">参加工作年月</td>'
				        + '<td nowrap class=td_form02><input type="text" size="10" id="workDate" name="workDate" /></td>'
				        + '<td height="24" class="td_form01">所属党组织名称</td>'
				        /* + '<td nowrap class=td_form02><select name="partyName" id="partyName">'
				        + partyNames + '</td></tr>' */
				        + '<td nowrap class=td_form02><select name="generalPartyName" id="generalPartyName" onchange="setPartyName()">'
				        + generalPartyNames + '</select><br />'
				        + '<select name="partyName" id="partyName">'
				        + partyNames + '</select></td></tr>'
				        + '<tr><td class="td_form01">党员类型</td>'
					    + '<td nowrap class=td_form02><select name="memberType" id="memberType"><option value=""></option><option value="正式党员">正式党员</option><option value="预备党员">预备党员</option></select></td>'
						+ '<td height="24" class="td_form01">入党日期</td>'
				        + '<td nowrap class=td_form02><input type="text" size="10" id="joinDate" name="joinDate" /></td></tr>'
				        + '<tr><td height="24" class="td_form01">转正日期</td>'
				        + '<td nowrap class=td_form02><input type="text" size="10"  id="confirmDate" name="confirmDate" /></td>'
				        + '<td class="td_form01">职务名称</td>'
						+ '<td nowrap class=td_form02><input type="text" size="10" id="title" /></td></tr>'
						+ '<tr><td height="24" class="td_form01">年龄段</td>'
				      	+ '<td nowrap class=td_form02 colspan="3">最小年龄：<input type="text" size="10" id="minAge" />&nbsp;最大年龄：<input type="text" size="10" id="maxAge" /></td></tr>'
				      	+ '<tr><td height="24" class="td_form01">参加工作日期段</td>'
				      	+ '<td nowrap class=td_form02 colspan="3">最早参加工作日期：<input type="text" size="10" id="minWorkDate" readonly="readonly" onClick="WdatePicker({dateFmt:' + "\'yyyy-MM-dd\'" + '})" /><img src="/djzx/images/datePicker.png">&nbsp;最晚参加工作日期：<input type="text" size="10" id="maxWorkDate" readonly="readonly" onClick="WdatePicker({dateFmt:' + "\'yyyy-MM-dd\'" + '})" /><img src="/djzx/images/datePicker.png"></td></tr>'
				      	+ '<tr><td height="24" class="td_form01">入党日期段</td>'
				      	+ '<td nowrap class=td_form02 colspan="3">最早入党日期：<input type="text" size="10" id="minJoinDate" readonly="readonly" onClick="WdatePicker({dateFmt:' + "\'yyyy-MM-dd\'" + '})" /><img src="/djzx/images/datePicker.png">&nbsp;最晚入党日期：<input type="text" size="10" id="maxJoinDate" readonly="readonly" onClick="WdatePicker({dateFmt:' + "\'yyyy-MM-dd\'" + '})" /><img src="/djzx/images/datePicker.png"></td></tr>'
				      	+ '<tr><td height="24" class="td_form01">转正日期段</td>'
				      	+ '<td nowrap class=td_form02 colspan="3">最早转正日期：<input type="text" size="10" id="minConfirmDate" readonly="readonly" onClick="WdatePicker({dateFmt:' + "\'yyyy-MM-dd\'" + '})" /><img src="/djzx/images/datePicker.png">&nbsp;最晚转正日期：<input type="text" size="10" id="maxConfirmDate" readonly="readonly" onClick="WdatePicker({dateFmt:' + "\'yyyy-MM-dd\'" + '})" /><img src="/djzx/images/datePicker.png"></td></tr>'
				      	+ '<tr><td height="24" class="td_form01">备注</td>'
				      	+ '<td nowrap class=td_form02 colspan="3"><textarea rows="5" cols="100" id="note"></textarea></td></tr></table>'
				      	+ '<br><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">'
						+ '<tr><td align="center"><input name="Submit2" type="submit" class="buttonface" value="  查询  " onClick="advancedQueryMember()"></tr></table>'
				  
					// 页面一打开就执行，放入ready是为了layer所需配件（css、扩展模块）加载完毕
					layer.ready(function(){ 
						//官网欢迎页
						layer.open({
							type: 1,
							//skin: 'layui-layer-lan',
							title: '高级查询',
							fix: false,
							shadeClose: true,
							maxmin: true,
							area: [layerW, layerH],
							content: content,
							end: function(){
								//layer.tips('试试相册模块？', '#photosDemo', {tips: 1})
							}
						});
					});
				}
			}
		}); 
	}
	
	// 高级查询界面
	$('#advancedQuery').on('click', function(){ 
		ajaxParty(1);
	});
});
</script>
</body>
</html>
